"""Base tests for comparator tool"""
import binascii
import inspect
import unittest

from module import MethodHolder


class BaseTest(unittest.TestCase):
    EXPECTED_CRC32 = 2895804925

    def test_can_get_method_source(self):
        method = MethodHolder().call_me
        method_source_code = inspect.getsource(method)
        method_crc32 = binascii.crc32(method_source_code.encode())
        self.assertEqual(method_crc32, self.EXPECTED_CRC32)
